﻿//产品调拨明细行
var columns =
            [
                 { display: 'Key', name: 'Id', type: 'text', hide: 1 },
                  { display: 'ProductAllotID', name: 'ProductAllotID', type: 'text', hide: 1 },
                   { display: 'ProductID', name: 'ProductID', type: 'text', hide: 1 },
                   { display: 'ProductSellBillDetailID', name: 'ProductSellBillDetailID', type: 'text', hide: 1 },
                   { display: '产品类别', name: 'TypeName', mintWidth: 80, width: 120, type: 'text' },
                   { display: '产品名称', name: 'ProductName', mintWidth: 80, width: 160, type: 'text' },
                   { display: '产品编码', name: 'ProductCode', mintWidth: 80, width: 100, type: 'text' },
                    { display: '产品规格', name: 'ProductStandard', mintWidth: 80, width: 200, type: 'text' },
                { display: '调拨数量', name: 'AllotAmount', mintWidth: 60, width: 80, type: 'int', editor: { type: 'int'} },
                { display: '调拨单价', name: 'AllotPrice', mintWidth: 100, width: 140, type: 'float', editor: { type: 'float'} },
                { display: '备注', name: 'Remarks', mintWidth: 80, width: 140, editor: { type: 'text'} }
             ];

var manager;
//init controls
$(document).ready(function () {
    initligerGrid();
});
manager = null;
function initligerGrid() {
    manager = $("#ProductAllotItemDetailGrid").ligerGrid({
        columns: columns,
        title: '调拔信息管理',//不能要标题，修改的BUG，不在ligerui.min.js文件中，所以这个BUG还是存在
        showTitle: false,
        width: '100%',
        enabledSort: true,
        enabledEdit: true,
        minHeight: '100px',
        checkbox: false,
        rownumbers: true,
        url: "../ProductAllot/GetJsonOfBillDetails?billId=" + $("#Id").val() + "&rand=" + Math.random()
    });
}

